There has been conventionally proposed an image forming apparatus having a function for cleaning a transfer belt. This image forming apparatus has the transfer belt, a detection sensor, and a cleaning unit. In the image forming apparatus, an image for density detection is formed on a conveyance surface of the transfer belt. Based on detection results of the density detection image by the density sensor, image density of the density detection image is acquired. Next, the cleaning unit is used to clean the conveyance surface of the transfer belt. Thereafter, based on detection results of the conveyance surface of the transfer belt by the density sensor, it is determined whether the conveyance surface of the transfer belt needs to be cleaned moreover. When it is determined that the transfer belt needs to be cleaned moreover, the cleaning unit is used again to clean the conveyance surface of the transfer belt.